import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';
import requestTypes from '../common';
/*** =========================== 分页查询接口  =========================== */
// 危险源列表 查询所有 /SMS/Hazard/GetHazardList
export const HazardGetHazardList = (params?: object) => {
	return request({
		url: '/SMS/Hazard/GetHazardList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}
// 员工下拉框 查询 /sysEmp/selector
export const sysEmpSelector = (params?: object) => {
	return request({
		url: '/sysEmp/selector',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 用户下拉框 /sysUser/selector 当前更改接口为 /SMS/JobApply/ChooseAuditEmp
export const sysUserSelector = (params?: object) => {
	return request({
		url: '/SMS/JobApply/ChooseAuditEmp',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 数据字典 下拉框 /sysDictData/list
export const sysDictDataList = (params?: object) => {
	return request({
		url: '/sysDictData/list',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 作业申请 分页查询 /SMS/JobApply/QueryPageList
export const JobApplyQueryPageList = (params?: object) => {
	return request({
		url: '/SMS/JobApply/QueryPageList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 作业审批 分页查询 /SMS/JobAudit/Page
export const JobAuditPage = (params?: object) => {
	return request({
		url: '/SMS/JobAudit/Page',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 作业审批 分页查询 /SMS/SecurityCheck/Page
export const SecurityCheckPage = (params?: object) => {
	return request({
		url: '/SMS/SecurityCheck/Page',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 供应商 下拉框 /OMS/Provider/GetList
export const ProviderGetList = (params?: object) => {
	return request({
		url: '/OMS/Provider/GetList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 组织机构列表 /sysOrg/tree
export const sysOrgTree = (params?: object) => {
	return request({
		url: '/sysOrg/tree',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 安全整改 查询 /SMS/SecurityCheckChange/Page
export const SecurityCheckChangePage = (params?: object) => {
	return request({
		url: '/SMS/SecurityCheckChange/Page',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 风险汇总查询 /SMS/RiskSummary/Page
export const RiskSummaryPage = (params?: object) => {
	return request({
		url: '/SMS/RiskSummary/Page',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 体检记录查询 /SMS/PhysicalRecord/Page
export const PhysicalRecordPage = (params?: object) => {
	return request({
		url: '/SMS/PhysicalRecord/Page',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 人员下拉框查询 /OMS/EmpWorkType/QueryPageList
export const EmpWorkTypeQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/EmpWorkType/QueryPageList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 职业病防护 查询 /SMS/Occupational/Page
export const OccupationalPage = (params?: object) => {
	return request({
		url: '/SMS/Occupational/Page',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 项目数据下拉框 /PMS/projectitem/selector
export const projectitemSelector = (params?: object) => {
	return request({
		url: '/PMS/projectitem/selector',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 工种类型下拉框 /OMS/WorkType/GetList
export const WorkTypeGetList = (params?: object) => {
	return request({
		url: '/OMS/WorkType/GetList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取人员及工种信息 /OMS/EmpWorkType/GetKeyWordList
export const EmpWorkTypeGetKeyWordList = (params?: object) => {
	return request({
		url: '/OMS/EmpWorkType/GetKeyWordList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取危险源树节点 /SMS/Hazard/GetHazardTree
export const HazardGetHazardTree = (params?: object) => {
	return request({
		url: '/SMS/Hazard/GetHazardTree',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 危险源详情 /SMS/Hazard/GetHazardLevelList
export const HazardGetHazardLevelList = (params?: object) => {
	return request({
		url: '/SMS/Hazard/GetHazardLevelList',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取第一级友商信息 /sysOrg/GetParentOrgId
export const sysOrgGetParentOrgIdt = (params?: object) => {
	return request({
		url: '/sysOrg/GetParentOrgId',
		method: 'get',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

/*** =========================== 新增接口  =========================== */
// 作业申请 新增 /SMS/JobApply/AddJob
export const JobApplyAddJob = (params?: object) => {
	return request({
		url: '/SMS/JobApply/AddJob',
		method: 'post',
		data: params,
        multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 安全巡检 新增 /SMS/SecurityCheck/Add
export const SecurityCheckAdd = (params?: object) => {
	return request({
		url: '/SMS/SecurityCheck/Add',
		method: 'post',
		data: params,
        multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 体检记录 新增 /SMS/PhysicalRecord/Add
export const PhysicalRecordAdd = (params?: object) => {
	return request({
		url: '/SMS/PhysicalRecord/Add',
		method: 'post',
		data: params,
        multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 职业病防护 新增 /SMS/Occupational/Add
export const OccupationalAdd = (params?: object) => {
	return request({
		url: '/SMS/Occupational/Add',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

/*** =========================== 编辑接口  =========================== */
// 安全巡检 编辑 /SMS/SecurityCheck/Update
export const SecurityCheckUpdate = (params?: object) => {
	return request({
		url: '/SMS/SecurityCheck/Update',
		method: 'post',
		data: params,
        multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 安全整改 编辑 /SMS/SecurityCheckChange/Update
export const SecurityCheckChangeUpdate = (params?: object) => {
	return request({
		url: '/SMS/SecurityCheckChange/Update',
		method: 'post',
		data: params,
        multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 体检记录 编辑 /SMS/PhysicalRecord/Update
export const PhysicalRecordUpdate = (params?: object) => {
	return request({
		url: '/SMS/PhysicalRecord/Update',
		method: 'post',
		data: params,
        multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 职业病防护 编辑 /SMS/Occupational/Update
export const OccupationalUpdate = (params?: object) => {
	return request({
		url: '/SMS/Occupational/Update',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

/*** =========================== 删除接口  =========================== */
// 作业申请 撤销 /SMS/JobApply/CancelApply
export const JobApplyCancelApply = (params?: object) => {
	return request({
		url: '/SMS/JobApply/CancelApply',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 作业审批 /SMS/JobApply/ChangeAuditState
export const JobApplyChangeAuditState = (params?: object) => {
	return request({
		url: '/SMS/JobApply/ChangeAuditState',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 安全巡检 删除 /SMS/SecurityCheck/Delete
export const SecurityCheckDelete = (params?: object) => {
	return request({
		url: '/SMS/SecurityCheck/Delete',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 体检记录 删除 /SMS/PhysicalRecord/Delete
export const PhysicalRecordDelete = (params?: object) => {
	return request({
		url: '/SMS/PhysicalRecord/Delete',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 职业病防护 删除 /SMS/Occupational/Delete
export const OccupationalDelete = (params?: object) => {
	return request({
		url: '/SMS/Occupational/Delete',
		method: 'post',
		data: params,
        multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 单文件上传 /sysFileInfo/uploadfile	
export const sysFileInfoUploadfile = (params: object) => {
	return request({
		url: '/sysFileInfo/uploadfile',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 多文件上传 有返回值提示 /sysFileInfo/multipleUpload
export const sysFileInfoMultipleUpload = (params: object) => {
	return requestTypes({
		url: '/sysFileInfo/multipleUpload',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 多文件上传 无返回值提示 /sysFileInfo/multipleUploads
export const sysFileInfoMultipleUploads = (params: object) => {
	return requestTypes({
		url: '/sysFileInfo/multipleUploads',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 获取雪花id /OMS/AttendanceRecord/GenerateId
export const AttendanceRecordGenerateId = (params?: object) => {
	return request({
		url: '/OMS/AttendanceRecord/GenerateId',
		method: 'get',
		data: params,
	});
}

// 文件删除 /sysFileInfo/delete
export const sysFileInfoDelete = (params: object) => {
	return request({
		url: '/sysFileInfo/delete',
		method: 'post',
		data: params,
	});
}

// 批量导入数据 /SMS/Upload/BatchImportData
export const UploadBatchImportData = (params: object) => {
	return request({
		url: '/SMS/Upload/BatchImportData',
		method: 'post',
		data: params,
	});
}

// 安全管理驾驶舱 /SMS/Control/Board
export const ControlBoard = (params: object) => {
	return request({
		url: '/SMS/Control/Board',
		method: 'get',
		data: params,
	});
}

